use ATE
go



--
IF OBJECT_ID ( 'Customer_Insert', 'P' ) IS NOT NULL 
    DROP PROCEDURE Customer_Insert;
GO
CREATE PROCEDURE Customer_Insert
    @CustomerID nvarchar(50),
	@CustomerName nvarchar(50) =null	
AS    
    SET NOCOUNT ON;
    insert into Customer(CustomerID,CustomerName)
	Values( @CustomerID,@CustomerName);	
GO

--
IF OBJECT_ID ( 'Customer_Delete', 'P' ) IS NOT NULL 
    DROP PROCEDURE Customer_Delete;
GO
CREATE PROCEDURE Customer_Delete
    @CustomerID nvarchar(50)
AS    
    SET NOCOUNT ON;
    delete from Customer
	where CustomerID=@CustomerID
GO



--
IF OBJECT_ID ( 'Customer_select', 'P' ) IS NOT NULL 
    DROP PROCEDURE Customer_select;
GO
CREATE PROCEDURE Customer_select
AS    
    SET NOCOUNT ON;
    select CustomerID,CustomerName
	from Customer;	
GO


--
IF OBJECT_ID ( 'Customer_selectName', 'P' ) IS NOT NULL 
    DROP PROCEDURE Customer_selectName;
GO
CREATE PROCEDURE Customer_selectName
AS    
    SET NOCOUNT ON;
    select CustomerName
	from Customer;	
GO

--
IF OBJECT_ID ( 'Customer_selectbyID', 'P' ) IS NOT NULL 
    DROP PROCEDURE Customer_selectbyID;
GO
CREATE PROCEDURE Customer_selectbyID
	@CustomerID nvarchar(50)
AS    
    SET NOCOUNT ON;
    select CustomerID,CustomerName
	from Customer
	where CustomerID=@CustomerID;	
GO